import { App, h } from 'vue';
import GunsFlowUi from '@javaguns/flow-ui';
import { pluginManager } from '@javaguns/utils';
import Request from './request';
export default {
	install(app: App) {
		app.use(GunsFlowUi, {
			ui: 'ant-design-vue',
			axios: Request,
		});
		pluginManager.component('Button', async () => (await import('ant-design-vue')).Button);
		pluginManager.component('Input', async () => (await import('ant-design-vue')).Input);
		pluginManager.component('InputNumber', async () => (await import('ant-design-vue')).InputNumber);
		pluginManager.component('InputSearch', async () => (await import('ant-design-vue')).InputSearch);
		pluginManager.component('Textarea', async () => (await import('ant-design-vue')).Textarea);
		pluginManager.component('Drawer', async () => (await import('ant-design-vue')).Drawer);
		pluginManager.component('Dialog', async () => (await import('ant-design-vue')).Modal);
		pluginManager.component('Menu', async () => (await import('ant-design-vue')).Menu);
		pluginManager.component('Submenu', async () => h('div'));
		pluginManager.component('MenuItem', async () => (await import('ant-design-vue')).Menu.Item);
		pluginManager.component('Card', async () => (await import('ant-design-vue')).Card);
		pluginManager.component('Tabs', async () => (await import('ant-design-vue')).Tabs);
		pluginManager.component('TabPane', async () => (await import('ant-design-vue')).Tabs.TabPane);
		pluginManager.component('RadioGroup', async () => (await import('ant-design-vue')).Radio.Group);
		pluginManager.component('Radio', async () => (await import('ant-design-vue')).Radio);
		pluginManager.component('Select', async () => (await import('ant-design-vue')).Select);
		pluginManager.component('SelectOptionGroup', async () => (await import('ant-design-vue')).SelectOptGroup);
		pluginManager.component('SelectOption', async () => (await import('ant-design-vue')).SelectOption);
		pluginManager.component('Row', async () => (await import('ant-design-vue')).Row);
		pluginManager.component('Col', async () => (await import('ant-design-vue')).Col);
		pluginManager.component('Switch', async () => (await import('ant-design-vue')).Switch);
		pluginManager.component('Checkbox', async () => (await import('ant-design-vue')).Checkbox);
		pluginManager.component('CheckboxGroup', async () => (await import('ant-design-vue')).Checkbox.Group);
		pluginManager.component('Form', async () => (await import('ant-design-vue')).Form);
		pluginManager.component('FormItem', async () => (await import('ant-design-vue')).FormItem);
		pluginManager.component('FormItemRest', async () => (await import('ant-design-vue')).FormItemRest);
		pluginManager.component('DatePicker', async () => (await import('ant-design-vue')).DatePicker);
		pluginManager.component('TimePicker', async () => (await import('ant-design-vue')).TimePicker);
		pluginManager.component('Cascader', async () => (await import('ant-design-vue')).Calendar);
		pluginManager.component('Tree', async () => (await import('ant-design-vue')).Tree);
		pluginManager.component('Empty', async () => (await import('ant-design-vue')).Empty);
		pluginManager.component('Table', async () => (await import('ant-design-vue')).Table);
		pluginManager.component('TableColumn', async () => (await import('ant-design-vue')).TableColumn);
		pluginManager.component('Pagination', async () => (await import('ant-design-vue')).Pagination);
		pluginManager.component('Tooltip', async () => (await import('ant-design-vue')).Tooltip);
		pluginManager.component('Timeline', async () => (await import('ant-design-vue')).Timeline);
		pluginManager.component('TimelineItem', async () => (await import('ant-design-vue')).Timeline.Item);
		pluginManager.component('Tag', async () => (await import('ant-design-vue')).Tag);
		pluginManager.component('Badge', async () => (await import('ant-design-vue')).Badge);
		pluginManager.component('Avatar', async () => (await import('ant-design-vue')).Avatar);
		pluginManager.component('Skeleton', async () => (await import('ant-design-vue')).Skeleton);
		pluginManager.component('Affix', async () => (await import('ant-design-vue')).Affix);
		pluginManager.component('Container', async () => (await import('ant-design-vue')).Layout);
		pluginManager.component('Header', async () => (await import('ant-design-vue')).Layout.Header);
		pluginManager.component('Main', async () => (await import('ant-design-vue')).Layout.Content);
	},
};
